package cyou.breathe;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;

import java.util.Collection;

/**
 * @author: breathe
 * @createTime: 2025-06-16
 */
public interface Cache {
    /**
     * 获取缓存
     */
    <T> T get(@NotBlank String key, Class<T> clazz);

    /**
     * 放入缓存
     */
    void put(@NotBlank String key, Object value);
    Boolean putIfAllAbsent(@NotNull Collection<String> keys);
    Boolean delete(@NotBlank String key);
    Long delete(@NotNull Collection<String> keys);
    Boolean hasKey(@NotBlank String key);
    Object getInstance();
}
